From 6dd4a6cbc7ed5c7eb33c2f5c5bc3faaac9392613 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 19 Dec 2006 19:15:02 +0000 Subject: [PATCH] Magellan files that don't have $ in column zero now rejected instead of crashing. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2600 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/magproto.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gpsbabel/magproto.c b/gpsbabel/magproto.c index c23a529a7..c5c0f7595 100644 --- a/gpsbabel/magproto.c +++ b/gpsbabel/magproto.c @@ -425,6 +425,12 @@ retry: } } + /* If column zero isn't a dollar sign, it's not for us */ + if (ibuf[0] != '$') { + fatal(MYNAME ": line doesn't start with '$'.\n"); + } + + isz = strlen(ibuf); if (isz < 5) { -- 2.30.2